package _1._0._0._127.ormrpc.services.WSWsMessageCenterFacade;

public class WSWsMessageCenterFacadeSrvProxyProxy implements WSWsMessageCenterFacadeSrvProxy {
    private String _endpoint = null;
    private WSWsMessageCenterFacadeSrvProxy wSWsMessageCenterFacadeSrvProxy = null;

    public WSWsMessageCenterFacadeSrvProxyProxy() {
        _initWSWsMessageCenterFacadeSrvProxyProxy();
    }

    public WSWsMessageCenterFacadeSrvProxyProxy(String endpoint) {
        _endpoint = endpoint;
        _initWSWsMessageCenterFacadeSrvProxyProxy();
    }

    private void _initWSWsMessageCenterFacadeSrvProxyProxy() {
        try {
            wSWsMessageCenterFacadeSrvProxy = (new WSWsMessageCenterFacadeSrvProxyServiceLocator()).getWSWsMessageCenterFacade();
            if (wSWsMessageCenterFacadeSrvProxy != null) {
                if (_endpoint != null)
                    ((javax.xml.rpc.Stub) wSWsMessageCenterFacadeSrvProxy)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
                else
                    _endpoint = (String) ((javax.xml.rpc.Stub) wSWsMessageCenterFacadeSrvProxy)._getProperty("javax.xml.rpc.service.endpoint.address");
            }

        } catch (javax.xml.rpc.ServiceException serviceException) {
        }
    }

    public String getEndpoint() {
        return _endpoint;
    }

    public void setEndpoint(String endpoint) {
        _endpoint = endpoint;
        if (wSWsMessageCenterFacadeSrvProxy != null)
            ((javax.xml.rpc.Stub) wSWsMessageCenterFacadeSrvProxy)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);

    }

    public WSWsMessageCenterFacadeSrvProxy getWSWsMessageCenterFacadeSrvProxy() {
        if (wSWsMessageCenterFacadeSrvProxy == null)
            _initWSWsMessageCenterFacadeSrvProxyProxy();
        return wSWsMessageCenterFacadeSrvProxy;
    }

    public int getUndiposeAssignCount(String status, String userId) throws java.rmi.RemoteException, wsmessagecenterfacade.client.WSInvokeException {
        if (wSWsMessageCenterFacadeSrvProxy == null)
            _initWSWsMessageCenterFacadeSrvProxyProxy();
        return wSWsMessageCenterFacadeSrvProxy.getUndiposeAssignCount(status, userId);
    }

    public boolean updateMessageStatus(String msgSourceID, int state) throws java.rmi.RemoteException, wsmessagecenterfacade.client.WSInvokeException {
        if (wSWsMessageCenterFacadeSrvProxy == null)
            _initWSWsMessageCenterFacadeSrvProxyProxy();
        return wSWsMessageCenterFacadeSrvProxy.updateMessageStatus(msgSourceID, state);
    }

    public int checkMessageCount(String userID) throws java.rmi.RemoteException, wsmessagecenterfacade.client.WSInvokeException {
        if (wSWsMessageCenterFacadeSrvProxy == null)
            _initWSWsMessageCenterFacadeSrvProxyProxy();
        return wSWsMessageCenterFacadeSrvProxy.checkMessageCount(userID);
    }

    public int getDisposeAssignCount(String userId) throws java.rmi.RemoteException, wsmessagecenterfacade.client.WSInvokeException {
        if (wSWsMessageCenterFacadeSrvProxy == null)
            _initWSWsMessageCenterFacadeSrvProxyProxy();
        return wSWsMessageCenterFacadeSrvProxy.getDisposeAssignCount(userId);
    }

    public String getMessageList(String userNumber) throws java.rmi.RemoteException, wsmessagecenterfacade.client.WSInvokeException {
        if (wSWsMessageCenterFacadeSrvProxy == null)
            _initWSWsMessageCenterFacadeSrvProxyProxy();
        return wSWsMessageCenterFacadeSrvProxy.getMessageList(userNumber);
    }

    public boolean addMessage(String userID, String title, String senderID, int priority, int status, String body, String sourceID, String type, String bizType, String url, String sysSign, String recieveTime) throws java.rmi.RemoteException, wsmessagecenterfacade.client.WSInvokeException {
        if (wSWsMessageCenterFacadeSrvProxy == null)
            _initWSWsMessageCenterFacadeSrvProxyProxy();
        return wSWsMessageCenterFacadeSrvProxy.addMessage(userID, title, senderID, priority, status, body, sourceID, type, bizType, url, sysSign, recieveTime);
    }

    public boolean removeMsgBySID(String sourceID) throws java.rmi.RemoteException, wsmessagecenterfacade.client.WSInvokeException {
        if (wSWsMessageCenterFacadeSrvProxy == null)
            _initWSWsMessageCenterFacadeSrvProxyProxy();
        return wSWsMessageCenterFacadeSrvProxy.removeMsgBySID(sourceID);
    }

    public String getMessageXML(String userNumber, String type, String bizType, String readStatus, String sourceStatus, String nodeType, String orgNumber, boolean ifHistory) throws java.rmi.RemoteException, wsmessagecenterfacade.client.WSInvokeException {
        if (wSWsMessageCenterFacadeSrvProxy == null)
            _initWSWsMessageCenterFacadeSrvProxyProxy();
        return wSWsMessageCenterFacadeSrvProxy.getMessageXML(userNumber, type, bizType, readStatus, sourceStatus, nodeType, orgNumber, ifHistory);
    }

    public int getBMCMessageCount(String userId, String type, String bizType, String state) throws java.rmi.RemoteException, wsmessagecenterfacade.client.WSInvokeException {
        if (wSWsMessageCenterFacadeSrvProxy == null)
            _initWSWsMessageCenterFacadeSrvProxyProxy();
        return wSWsMessageCenterFacadeSrvProxy.getBMCMessageCount(userId, type, bizType, state);
    }

    public boolean removeMsgByID(String messageID) throws java.rmi.RemoteException, wsmessagecenterfacade.client.WSInvokeException {
        if (wSWsMessageCenterFacadeSrvProxy == null)
            _initWSWsMessageCenterFacadeSrvProxyProxy();
        return wSWsMessageCenterFacadeSrvProxy.removeMsgByID(messageID);
    }

    public boolean clearMessageCount(String userID) throws java.rmi.RemoteException, wsmessagecenterfacade.client.WSInvokeException {
        if (wSWsMessageCenterFacadeSrvProxy == null)
            _initWSWsMessageCenterFacadeSrvProxyProxy();
        return wSWsMessageCenterFacadeSrvProxy.clearMessageCount(userID);
    }


}